import { createApp } from 'vue'

import App from './App.vue';
import { createPinia } from 'pinia';
import router from "./assets/router/index.js"
//导入index.css
import "./assets/css/index.css";
import "animate.css";
//导入element-plus
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';

import 'element-plus/dist/index.css';

//导入pinia持久化插件
import PiniaPuginPersistedState from "pinia-plugin-persistedstate";

import PageView from "./assets/components/PageView.vue";
import LoginPage from "./assets/components/LoginPage.vue";

import Header from './assets/components/Header.vue';
import Footer from './assets/components/Footer.vue';

import Swiper from './assets/components/Swiper.vue';
import GoodsSwiper from "./assets/components/GoodsSwiper.vue"
import AddAddress from "./assets/components/AddAddress.vue";
import  orderInfoDrawer from "./assets/components/orderInfoDrawer.vue"
const app= createApp(App);

app.use(ElementPlus, {
  locale: zhCn,
});
app.use(router);
const pinia=createPinia();
pinia.use(PiniaPuginPersistedState);
//全局主件
app.component("page-view", PageView);
app.component("header-menu", Header);
app.component("footer-menu", Footer);
app.component("goods-swiper", GoodsSwiper);
app.component("index-swiper", Swiper);
app.component("add-address",AddAddress);
app.component("order-info-drawer",orderInfoDrawer)
app.use(pinia);

app.provide("baseURL",baseURL);
app.component("login-page",LoginPage);
app.mount('#app');
